package com.laxcen.basiclib;


import android.Manifest;

import com.laxcen.basiclib.bean.Config;

/**
 *  静态常量配置
 */
public class BaseConst {

    /**
     * 这些参数允许其他项目引用时可修改
     * @param config
     */
    public static void init(Config config){
        DEBUG = config.isDEBUG();
        ENVIR = config.getEnvir();
        appId = config.getAppId();
    }

    //APPID
    public static String appId;
    //是否调试模式
    public static boolean DEBUG = true;
    //运行环境
    public static Envir ENVIR = Envir.DEVELPOER;
    //运行环境类型
    public enum Envir{
        DEVELPOER,//开发
        TEST,//测试
        PRODUCE//生产
    }
    //进入APP获取一些基本的权限
    public static String[] permission = {
            Manifest.permission.READ_PHONE_STATE,
            Manifest.permission.READ_EXTERNAL_STORAGE ,
            Manifest.permission.WRITE_EXTERNAL_STORAGE
    };


    ////////////////////////////Mqtt配置//////////////////////////

    public static final String mqttHost = "tcp://2683f90355.51vip.biz:42643";
    public static final String mqttUsername = "admin";
    public static final String mqttPassword = "admin";

    ////////////////////////////通知配置/////////////////////////////

    public static final String notificationChannelId = "laxcen";
    public static final String notificationChannelName="laxcen_notif";





    /////////////////////////数据库配置////////////////////////////
    //数据库名
    public static final String dbName = "laxcen_"+BaseApp.getApp().getPackageName();
    //数据库表
    public static final Class[] dbTable = {

    };

    ////////////////////////////////////////////////////////////////


    public static final String CHECK_VERSION_URL = "http://test-iot.laxcensoft.com:19012/api/appVersion/checkVersion";
    //新版本标记位置
    public static final String NEW_VERSION_LOAD_PATH ="newVersionLoadPath";
    //H5更新包下载完成之后推送给UI
    public static final String ACTION_DOWNLOADED_H5_UPLOAD="action_downloaded_h5_upload";
    //H5更新之后的动作
    public static final String ACTION_H5_UPLOADED="action_h5_uploaded";

    //程序出现崩溃时发送广播通知
    public final static String CAUGHT_EXCEPTION = "CAUGHT_EXCEPTION";
}
